package org.easy.amapgeo;

import lombok.Data;
 //https://lbs.amap.com/api/webservice/guide/api/ipconfig
@Data
public class GeoTemplate {
    private String key;
    private Integer defaultRadius;
    private AmapGeoClient client;

    public GeoTemplate(String key, Integer defaultRadius, AmapGeoClient client) {
        this.key = key;
        this.client = client;
        this.defaultRadius = defaultRadius;
    }

    public GeoAddress getGeoAddress(String lng, String lat) {
        return client.getAddress(key, lng, lat, defaultRadius);
    }


}
